auto merge of #500 : alexcrichton/cargo/fix-flaky-test, r=brson
authorbors <bors@rust-lang.org>
Wed, 3 Sep 2014 04:38:30 +0000 (04:38 +0000)
committerbors <bors@rust-lang.org>
Wed, 3 Sep 2014 04:38:30 +0000 (04:38 +0000)
commit300b9c4cfdc1809a6d0c07cf39f008040b6248f2
tree639886a01d0749a56ef19b0d02ee6cdb1b08989e
parentd5e90ff128d4b8624d2846de0cc4ca58d5426908
parentf3cb4232d85618f58d70db2a12655011373103c1
auto merge of #500 : alexcrichton/cargo/fix-flaky-test, r=brson

This test has been flaky on the bots for quite some time now, and the cause has
now been discovered. The root cause of the failure is that the execve for the
`cargo --list` command was failing with ETXTBUSY. In querying the manpage, this
means:

    Executable was open for writing by one or more processes.

This error can be explained by the following trace:

1. Thread A, running the `cargo --list` test, opens the destination executable
   for writing because it's copying the current executable into a different
   location.
2. Thread B, some other test, forks the process. The file descriptor of the
   destination executable of thread A is now duplicated in this process.
3. Thread A closes all files and such, and then goes to fork/exec
   `cargo --list`.
4. Thread B has not had time to close all its descriptors. so it still has the
   executable open for writing, causing the `execve` of thread A to fail.

This commit just removes these tested portions of the test, only testing that
cargo probes PATH.